import {GATEWAY_AXIOS} from './axios.js';

// POST - 登录
export function loginApi(params) {
    return GATEWAY_AXIOS.post('/employee/api/v1/auth/login', params);
}

// POST - 分页查询记录
export function pageApi(params) {
    return GATEWAY_AXIOS.post('/employee/api/v1/emp/page', params);
}

// POST - 添加一条记录
export function saveApi(params) {
    return GATEWAY_AXIOS.post('/employee/api/v1/emp/save', params)
}

// PUT - 修改一条记录
export function updateApi(params) {
    return GATEWAY_AXIOS.put('/employee/api/v1/emp/update', params)
}

// POST - 删除一条记录
export function removeApi(id) {
    return GATEWAY_AXIOS.delete('/employee/api/v1/emp/remove/' + id);
}

// POST - 批量删除记录
export function removeBatchApi(ids) {
    return GATEWAY_AXIOS.delete('/employee/api/v1/emp/batchRemove?ids=' + ids);
}

// POST - 重置用户密码
export function resetPasswdApi(id) {
    return GATEWAY_AXIOS.post('/employee/api/v1/emp/resetPasswd/' + id);
}

// POST - 修改用户密码
export function updatePasswdApi(params) {
    return GATEWAY_AXIOS.post('/employee/api/v1/emp/modifyPasswd', params);
}

// GET - 根据员工ID查询该员工的全部角色
export function listMyRolesApi(empId) {
    return GATEWAY_AXIOS.get('/employee/api/v1/emp/listMyRoles/' + empId);
}

// GET - 查询所有的讲师
export function listTeacherApi() {
    return GATEWAY_AXIOS.get('/employee/api/v1/emp/listByRole?roleIds=4,5');
}

// PUT - 根据员工ID和roleIds修改该员工的角色
export function updateMyRolesApi(params) {
    return GATEWAY_AXIOS.put('/employee/api/v1/emp/updateMyRoles', params);
}

// POST - 上传用户头像
export function UPLOAD_AVATAR_URL(params) {

}









